package com.junzhiit.nengji.shop.model.enums;

import com.bainaeco.framework.exception.InvalidArgumentException;

public enum PayHistoryType {
	
	BUY(0,"消费");
	
	private Integer value;
	
	private String text;

	private PayHistoryType(Integer value,String text) {
		this.value = value;
		this.text = text;
	}

	public int toIntValue() {
		return this.value;
	}
	
	public String toStringText() {
		return this.text;
	}

	public static PayHistoryType toType(int value) {
		if (BUY.value == value) {
			return BUY;
		} else {
			throw new InvalidArgumentException("Unknown PayHistoryType[" + value + "].");
		}
	}
}
